<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ttf-woff</title>
    <style>
        /* font-face {
            font-family: "DIN Alternate";
            src: url("./assets/fonts/DIN-RegularAlternate-2.otf") format("otf"),
        } */
        @font-face {
            font-family: "Roboto";
            /* woff格式兼容性更好，另format兼容性不好（format若不兼容可能直接忽略了） */
            src: url('./Roboto-Black.woff') format('woff');
            
            /* src: url("./assets/fonts/Roboto/Roboto-Black.ttf"), */

        }
        .myFont-1{
            font-family: "Roboto",serif;
            font-style: italic;
        }
        .myFont-2{
            
        }
        .myFont-3{
            font-family: Microsoft YaHei UI;
        }
       
       
    </style>
</head>

<body>
    <div class="myFont-1">你好啊--123456</div>
    <div class="myFont-2">你好啊--123456</div>
    <div class="myFont-3">你好啊--123456</div>

</body>

</html>